package cn.edu.zafu.bigdata.lyq.work5;

public class Cube {
    private  double length,width,height;
    public Cube(double length,double width,double height){
        this.length=length;
        this.width=width;
        this.height=height;
    }

    public double getLength() {
        return length;
    }

    public double getWidth() {
        return width;
    }

    public double getHeight() {
        return height;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        Cube cube = (Cube) obj;
        return Double.compare(cube.length, this.length) == 0 &&
                Double.compare(cube.width, this.width) == 0 &&
                Double.compare(cube.height, this.height) == 0;
    }
}
